home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Games / MoofWars / MoofEncoder / GridTilesFormat.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.8 KB  |  62 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        GridTilesFormat.h
  3.  
  4.     Contains:    This file describes the formats of a TileCollection and a TileGrid.
  5.                 We provide them both here so that our applications that build compiled
  6.                 files can also access the resource format.
  7.  
  8.     Written by: Timothy Carroll    
  9.  
  10.     Copyright:    Copyright © 1996-1999 by Apple Computer, Inc., All Rights Reserved.
  11.  
  12.                 You may incorporate this Apple sample source code into your program(s) without
  13.                 restriction. This Apple sample source code has been provided "AS IS" and the
  14.                 responsibility for its operation is yours. You are not permitted to redistribute
  15.                 this Apple sample source code as "Apple sample source code" after having made
  16.                 changes. If you're going to re-distribute the source, we require that you make
  17.                 it clear in the source that the code was descended from Apple sample source
  18.                 code, but that you've made changes.
  19.  
  20.     Change History (most recent first):
  21.                 7/1/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  22.                 8/15/96        Timothy Carroll Initial Release
  23.                 
  24.  
  25. */
  26.  
  27.  
  28. /****************************************************************************************************
  29. Resource Data Structures
  30. ****************************************************************************************************/
  31.  
  32. typedef struct TileCollectionResHeader TileCollectionResHeader;
  33. const UInt32 TileCollectionResType = 'TILE';
  34.  
  35. struct TileCollectionResHeader
  36. {
  37.     UInt32 version;
  38.     SInt16 depth;
  39.     UInt16 flags;
  40.     UInt32 numTiles;
  41.     
  42.     // Followed by 1k per tile in 32x32x8 bit format.
  43. };
  44.  
  45.  
  46. typedef UInt16 CellGridType;
  47.  
  48. typedef struct TileGridResHeader TileGridResHeader;
  49. const UInt32 TileGridResType = 'GRID';
  50.  
  51. struct TileGridResHeader
  52. {
  53.     UInt32 version;
  54.     UInt16 flags;
  55.     SInt16 tileResID;
  56.     UInt32 width;
  57.     UInt32 height;
  58.     UInt32 defaultTile;
  59.  
  60.     // followed by width x height x CellGridType for tile information in row x column format.
  61. };
  62.